<!--
 * @copyright: Huang Ding
 * @Author: ding-cx
 * @Date: 2020-12-29 08:44:29
 * @LastEditors: ding-cx
 * @LastEditTime: 2021-03-24 17:03:38
 * @Description: file content
-->
<template>
  <el-row :gutter="10">
    <!-- <el-col :span="24">{{$store.getters.appConfig}}</el-col> -->
    <el-col :span="6">
      <el-input
        v-model="tree.filterMsg"
        placeholder="请输入过滤信息"
        size="small"
      ></el-input>
      <el-scrollbar
        :style="{ height: treeHeight }"
        wrap-class="scrollbar-wrapper"
      >
        <el-tree
          ref="treeRef"
          :data="tree.data"
          :props="tree.props"
          :filter-node-method="tree.filterNode"
          :expand-on-click-node="false"
          default-expand-all
          highlight-current
          @node-click="tree.nodeClick"
          draggable
        >
          <span
            class="custom-tree-node"
            style="font-size: 14px"
            slot-scope="{ node, data }"
          >
            <span class="el-icon-folder-opened"></span>
            <span>{{ data.org_name + "[" + data.org_code + "]" }}</span>
          </span>
        </el-tree>
      </el-scrollbar>
    </el-col>
    <el-col :span="18">
      <base-crud-table
        ref="crud"
        :option="option"
        :data="data.rows"
        :page="page"
        :loading="loading"
        @page-change="pageChange"
        @add-submit="addSubmit"
        @row-edit-submit="editSubmit"
        @row-del="rowDel"
        @refresh="refresh"
        @row-dblclick="onRowDblclick"
      >
        <template #state-col="{ scope }">
          <el-switch v-model="scope.row.state" :disabled="true"></el-switch>
        </template>
      </base-crud-table>
    </el-col>
  </el-row>
</template>

<script src="./setup.js"></script>

<style>
</style>